
export default {
  namespace: 'app',
  state: {
    collapsed: false,
    mode: 'inline',
    defaultSelectedKeys: [],
    defaultOpenKeys: [],
  },
  reducers: {
    change(state) {
      const todos = !state.collapsed ? 'vertical' : 'inline';
      return { ...state, collapsed: !state.collapsed, mode: todos };
    },
    handleMenuItemClick(state, { payload: keyPath }) {
      return { ...state, defaultOpenKeys: [keyPath[1]], defaultSelectedKeys: [keyPath[0]] };
    },
  },
  effects: {},
  subscriptions: {},
};
